package org.jiajie.designpatterndemo.ocp.segmentfault;

/**
 * @author jay
 */
public class Test1 {
    public static void main(String[] args) {
        Computer computer = new AsusDiscountComputer(4888.88D, "dark blue", 8, 14.0F, 0.5F);
        AsusDiscountComputer asusDiscountComputer = (AsusDiscountComputer) computer;
        System.out.println(
                "电脑：华硕\n" +
                        "原价：" + asusDiscountComputer.getPrice() + "\n" +
                        "售价：" + asusDiscountComputer.getDiscountPrice() + "\n" +
                        "颜色：" + asusDiscountComputer.getColor() + "\n" +
                        "内存：" + asusDiscountComputer.getMemory() + "\n" +
                        "尺寸：" + asusDiscountComputer.getSize()
        );
    }
}
